#ifndef FILE_HANDLE_H
#define FILE_HANDLE_H

#include <QWindow>
#include <QObject>
#include "QString"
#include <QWidget>

class FileHandle : public QObject
{
    Q_OBJECT
public:
    explicit FileHandle(QObject *parent = nullptr);
    QStringList filterContent(const QString &content, const QRegularExpression &pattern);

    const char* defaultFileName = "test.txt";

private slots:
    void myFileProcess();
    void saveToFile();
    void openFile();

private:
    QStringList list;
    QString file_save_name;
    QString content;                    //用来保存从原始文件中读取到的内容
    QString file_raw_name;              //原始文件名（包含路径）

signals:
    // void open_file();
    // void open_file(QString fileName);
};

#endif // FILE_HANDLE_H
